'''
Created on 2009-6-12

@author: roamer
'''

import shelve
from Setting import *

class ValueStore:
    @staticmethod
    def Read(key):
        vals = shelve.open(Setting['DbFile'],"r")
        val = vals[key]
        vals.close()
        return val
    @staticmethod
    def Save(key,val):
        vals = shelve.open(Setting['DbFile'],"c")
        vals[key] = val
        vals.close()
